const multer = require('multer')

const storage = multer.diskStorage({
    destination:'public/uploads',
    filename:function(req,file,callback){
        var petname = req.cookies.petname
        callback(null,`${petname}.jpg`)
    }
})

module.exports = multer({ storage })